<?php 

	$listid 		= gpc_getStringArray("listid");
	$liststatus 	= gpc_getStringArray("liststatus");
	$listorder 		= gpc_getStringArray("listorder");  
    $ShowHome       = gpc_getStringArray("ShowHome"); 
    $id				= gpc_getIntPost("id",$id);         
	
	$countlist = count($listid);
	
	for ($i = 0; $i < $countlist ; $i ++)
	{     	
	$sql_update = "UPDATE  tblproduct_category SET 
				  iStatus	 = '$liststatus[$i]',
				  iOrder     = '$listorder[$i]',
                  iPlace     = '$ShowHome[$i]'
				  WHERE  iId = $listid[$i]";
	
	$dbsql->query($sql_update);
	} 
	
	
	
	$cActions = "Update Status product";
	
	Insert_Tracking($cActions);
	
	
	$msg = "Update product Status Success !";
	page_transfer($msg,$pagetr);
	
	exit();

?>
